//
//  WriterAddressViewController.m
//  FlowerRainGround
//
//  Created by lanou on 16/4/26.
//  Copyright © 2016年 lanou. All rights reserved.
//

#import "WriterAddressViewController.h"
#import "addAddressManager.h"
@interface WriterAddressViewController ()

@end

@implementation WriterAddressViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"增加地址";
    UIBarButtonItem *right = [[UIBarButtonItem alloc] initWithTitle:@"保存" style:UIBarButtonItemStylePlain target:self action:@selector(save)];
    self.navigationItem.rightBarButtonItem = right;
    


}


- (void) save {
    addressModel *model = [[addressModel alloc] init];
    model.recipite = self.ripitePerson.text;
    model.phoneNumber = self.phoneNumber.text;
    model.ZipCoding = self.coding.text;
    model.nowAddress = self.nowaddress.text;
    model.infoAddress = self.infoaddress.text;
    addAddressManager *manager =  [[addAddressManager alloc] init] ;
    [manager creatTable];
    [manager addAddressModel:model];
   
}












- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
